Image sensors typically used in security cameras are sensitive to both visible and infrared (IR) light. Due to this fact, security cameras typically employ an IR block filter to prevent IR light from reaching the image sensor in brightly lit scenes when there is enough visible light energy to create a high quality image. In such a case, the IR block filter removes IR light that would otherwise disturb the camera's color processing algorithms (e.g., white balance). Day-night security cameras include a means for removing the IR block filters to improve low light performance, particularly when an IR light source is used. The camera's color processing algorithms are typically disabled when the IR block filter is so removed and the video is presented in monochrome.
Typical day-night security cameras are designed so that the IR block filter is removed when visible light drops below a specified level. After the IR block filter is removed, the image sensor will respond to a mixture of visible and IR light (since IR light is no longer filtered). If the IR block filter is reinserted when the amount of visible light is too low, the filter will immediately be removed because the amount of filtered light reaching the sensor is too low. Such behavior may lead to an undesired oscillation in the IR block filter control mechanism. On the other hand, if the IR block filter is inserted only when the amount of visible light is high, the camera may remain in monochrome mode unnecessarily. While it is possible to use a separate visible light sensor to determine the available amount of visible light for controlling insertion of the IR filter, such a feature add costs and complexity to the camera. Consequently, most security cameras with a removable IR block filter use algorithms, two common types of which are described in the two paragraphs below.
A first common algorithm estimates the amount of visible light in a scene by measuring the difference between the overall light energy before and after the IR block filter was removed. When the light level exceeds the level measured immediately after the IR block filter was removed, it is assumed that there is enough visible light to keep the IR filter in place. This method works well for sunsets but is easily fooled when the mixture of IR to visible light changes significantly and by rapid changes in overall illumination particularly when those changes happen shortly after the IR block filter is removed.
A second commonly employed algorithm estimates the relative amount of visible light in a scene by analyzing three color components that (depending on the image sensor) may be red, green, and blue (RGB) or cyan, yellow, and magenta (CMY). These algorithms take advantage of the fact that each of the three color filters used to analyze color components in such systems has approximately an equal response to IR light. Consequently, a difference between sensor responses of the different color components provides a rough measure of the relative amount of visible light in the unfiltered light source. If the difference between sensor responses is nearly zero, it is generally assumed that the source contains mostly IR light. The difference between sensor responses typically grows as the amount of visible light relative to IR light increases, and the IR filter is reinserted when the relative difference between sensor responses exceeds a predetermined constant threshold. This type of algorithm works acceptably except when the combined visible and IR light source is near the level at which the IR block filter is removed, particularly when the illuminant contains similar amounts of IR and visible light mixed together (e.g., low-voltage incandescent light sources).